<br>
<h4>Javascript Support</h4>
You can use Javascript (ES5) to handle advanced requirements.
<br>
Javascript need to start with [JS] and end with [/JS]. The Javascript code inside will be interpreted and any result saved on variable called `output` will be repaced with [JS]...[/JS].
<br>
<br>
Eg.
<br>
<code>
M116<br>
[JS]<br>
var distance = [[LayerThickness]]-[[ZLiftDistance]]*[[LayerNumber]];<br>
var xmlHttp = new XMLHttpRequest();<br>
xmlHttp.open( "GET", "https://www.nanodlp.com/speed-calculation?distance="+distance,false);<br>
xmlHttp.send(null);<br>
output = "G1 Z"+distance+" F"+xmlHttp.responseText;<br>
[/JS]<br>
M117<br>
</code>
<br>
Result:
<br>
<code>
M116<br>
G1 Z22.25 F100<br>
M117<br>
</code>
<br>
